import request from '@/utils/request'

const api_name = '/admin/system/sysUser'

export const GetSysUserListByPage = (pageNum,pageSize,queryDto) => {
    //debugger
    return request({
        url: `${api_name}/findByPage/${pageNum}/${pageSize}`,
        method: 'get',
        params: queryDto
    })
}

export const SaveSysUser = (data) => {
    return request({
        url: `${api_name}/saveSysUser`,
        method: 'post',
        data
    })
}

export const UpdateSysUser = (data) => {
    return request({
        url: `${api_name}/updateSysUser`,
        method: 'put',
        data
    })
}

export const DeleteSysUserById = (roleId) => {
    return request({
        url: `${api_name}/deleteById/${roleId}`,
        method: 'delete'
    })
}

export const DoAssignRoleToUser = (assignRoleDto) => {
    return request({
        url: `/admin/system/sysRoleUser/doAssign`,
        method: 'post',
        data: assignRoleDto
    })
}

